<!-- 人员档案详情-操作记录 -->
<template>
  <div class="wrap">操作记录</div>
</template>

<script lang="ts" setup>
import { GetHumanRosterDetail } from '@/apis/management/human/humanRoster';

const route = useRoute();

let id = Number(route.query.id);

onBeforeRouteUpdate((to) => {
  id = Number(to.query.id);
  getData();
});

const getData = async () => {
  try {
    const res = await GetHumanRosterDetail({ id });
    console.log(res);
  } catch (error: unknown) {
    console.log(error);
  }
};
</script>

<style lang="less" scoped>
.wrap {
  padding: 10px 20px;
  display: flex;
}
</style>
